// 搜索api封装模块
import http from '@/utils/request'
// 联想建议
export const reqGetSuggestions = (q) => {
  return http({
    method: 'GET',
    url: 'v1_0/suggestion',
    params: {
      q // 搜索关键词
    }
  })
}
// 搜索结果的api
export const reqGetResult = (q, page = 1, per_page = 10) => {
  return http({
    method: 'GET',
    url: 'v1_0/search',
    params: {
      q, // 搜索的关键词
      page, // 页数
      per_page
    }
  })
}
